package com.lfk.justweengine.utils.tool;

import com.lfk.justweengine.utils.tools.TextUtils;
import org.junit.Assert;
import org.junit.Test;

public class TextUtilsOhosTest {

    @Test
    public void testIsEmptyForNull() {
        Assert.assertTrue(TextUtils.isEmpty(null));
    }

    @Test
    public void testIsEmptyForEmpty() {
        Assert.assertTrue(TextUtils.isEmpty(""));
    }

    @Test
    public void testIsEmpty() {
        Assert.assertFalse(TextUtils.isEmpty("11111"));
    }

    @Test
    public void testTestEquals() {
        Assert.assertFalse(TextUtils.equals("123", "456"));
    }

    @Test
    public void testTestEquals2() {
        Assert.assertTrue(TextUtils.equals("a1", "a1"));
    }


    @Test
    public void testTestEquals3() {
        StringBuffer a1 = new StringBuffer();
        a1.append("a");
        a1.append("b");
        StringBuffer a2 = new StringBuffer();
        a2.append("a");
        a2.append("b");
        Assert.assertTrue(TextUtils.equals(a1, a2));
    }
}